package com.selfdriving.dialog;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.selfdriving.BaseApplication;
import com.selfdriving.BaseObjectListAdapter;
import com.selfdriving.R;
import com.selfdriving.bean.Entity;
import com.selfdriving.bean.WriteScenic;
import com.selfdriving.view.HandyTextView;

public class EntityListDialogAdapter extends BaseObjectListAdapter
{

	public EntityListDialogAdapter(BaseApplication application,
			Context context, List<Entity> datas)
	{
		super(application, context, datas);
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2)
	{
		if (arg1 == null)
		{
			arg1 = mInflater.inflate(R.layout.listitem_dialog, null);
		}
		WriteScenic scenic = (WriteScenic) getItem(arg0);
		((HandyTextView) arg1.findViewById(R.id.listitem_dialog_text))
				.setText(scenic.getName());
		return arg1;
	}
}
